-- GENERATED SPELL FOR [Emeraldon Boughguard] --


function spell0_12474(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(20666,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12474', 581, 1)
end

function spell1_12474(pUnit, Event) --@Fixate,n/a--
pUnit:FullCastSpellOnTarget(12021,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12474', 10273, 1)
end

function spell2_12474(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(15708,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12474', 5254, 1)
end

function Sorts_12474(pUnit, Event)
local choix_sorts_12474 = math.random(0, 2)
if choix_sorts_12474 == 0 then
pUnit:RegisterEvent('spell0_12474', 1, 1)
end
if choix_sorts_12474 == 1 then
pUnit:RegisterEvent('spell1_12474', 1, 1)
end
if choix_sorts_12474 == 2 then
pUnit:RegisterEvent('spell2_12474', 1, 1)
end
end

function mob12474_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12474', math.random(1500, 3000), 1)
end

function mob12474_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12474_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12474_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12474, 1, 'mob12474_Action')
RegisterUnitEvent(12474, 2, 'mob12474_Leave')
RegisterUnitEvent(12474, 3, 'mob12474_Kill')
RegisterUnitEvent(12474, 4, 'mob12474_Die')
